﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EquipStandard.aspx.cs" Inherits="Common_EquipStandard"
    StylesheetTheme="Content" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>配备标准</title>
</head>
<body>
    <form id="form1" runat="server">

    <script type="text/javascript">
        //<![CDATA][
        function CheckAll(oCheckbox) {
            var items = document.getElementsByTagName("INPUT");
            for (i = 0; i < items.length; i++) {
                if (items[i].type == "checkbox") {
                    items[i].checked = oCheckbox.checked;
                }
            }
        }
        //]]>
    </script>

    <br />
    <asp:GridView ID="UserGrid" runat="server" AutoGenerateColumns="False" Caption="<span>编码列表</span>"
        DataKeyNames="ItemID" OnRowDataBound="UserGrid_RowDataBound">
        <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="ChkAll" type="checkbox" onclick="CheckAll(this)" runat="server" title="全选/取消" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="CheckItem" runat="server" />
                </ItemTemplate>
                <HeaderStyle Width="20px" />
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="30px" />
                <ItemTemplate>
                    <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="ItemID" HeaderText="编码">
                <HeaderStyle Width="120px" />
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="编码名称">
                <ItemTemplate>
                    <a title='<%# Eval("Description") %>'>
                        <%# GetItemName(Eval("ItemName").ToString(), (int)Eval("ItemLevel"))%></a>
                </ItemTemplate>
                <HeaderStyle Width="240px" />
            </asp:TemplateField>
            <asp:BoundField DataField="Description" HeaderText="描述"></asp:BoundField>
            <asp:TemplateField HeaderText="配备数量">
                <ItemTemplate>
                    <asp:TextBox ID="ItemCount" runat="server" Width="52px" Text='<%# GetItemCount(Eval("ItemID").ToString()) %>'></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="计算方式">
                <ItemTemplate>
                    <asp:DropDownList ID="ComputeBy" runat="server" Width="100%">
                        <asp:ListItem Value="人">人</asp:ListItem>
                        <asp:ListItem Value="班">班</asp:ListItem>
                        <asp:ListItem Value="站">站</asp:ListItem>
                    </asp:DropDownList>
                </ItemTemplate>
                <HeaderStyle Width="68px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div style="padding: 4px;">
        <div style="float: left">
            <asp:Label ID="lbGridInfo" runat="server"></asp:Label>
        </div>
        <div style="float: right">
            <asp:LinkButton ID="btnFirst" runat="server" CommandArgument="First" CommandName="Page"
                OnClick="btnFirst_Click">首页</asp:LinkButton>
            <asp:LinkButton ID="btnPrev" runat="server" CommandArgument="Prev" CommandName="Page"
                OnClick="btnPrev_Click">上一页</asp:LinkButton>
            <asp:LinkButton ID="btnNext" runat="server" CommandArgument="Next" CommandName="Page"
                OnClick="btnNext_Click">下一页</asp:LinkButton>
            <asp:LinkButton ID="btnLast" runat="server" CommandArgument="Last" CommandName="Page"
                OnClick="btnLast_Click">末页</asp:LinkButton>
            转到：第
            <asp:DropDownList ID="JumpList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="JumpList_SelectedIndexChanged">
            </asp:DropDownList>
            页
        </div>
    </div>
    <div class="clear">
    </div>
    <div style="text-align: center;">
        <asp:Button ID="ButtonSave" runat="server" OnClick="ButtonSave_Click" Text="保存">
        </asp:Button>
        <input type="button" class="button_default" value="取消" onclick="window.close();" />
    </div>
    <div class="prompt">
        <asp:Label ID="Prompt" runat="server"></asp:Label></div>
    </form>
</body>
</html>
